package com.senlingspace.payment.douyin.bean.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * 撤销验证
 *
 * @author lebronjames
 * @date 2024/07/23
 */
@Data
public class DouyinCancelVerifyResponse implements Serializable {

    @JsonProperty("data")
    private ResponseData data;

    @JsonProperty("extra")
    private DouyinCommonResponse.Extra extra;

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class ResponseData extends DouyinCommonResponse.CommonData {

        @JsonProperty("transaction_id")
        private Long transactionId;

        @JsonProperty("cancel_results")
        private List<Cancel> cancelResults;

    }

    @Data
    public static class Cancel implements Serializable {

        /**
         * 订单号
         */
        @JsonProperty("order_id")
        private String orderId;

        /**
         * 结果 code
         */
        @JsonProperty("result_code")
        private Long resultCode;

        /**
         * 履约记录 ID
         */
        @JsonProperty("verify_id")
        private String verifyId;

        /**
         * 结果信息
         */
        @JsonProperty("result_msg")
        private String resultMsg;

    }

}
